-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MMT-3410: Adds UMM-T draft forms #1091
Conversation
Added: CustomSelect CustomTextarea CustomDateTime CustomArrayField
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## MMT-3390 #1091 +/- ##
============================================
+ Coverage 89.13% 98.33% +9.20%
============================================
Files 16 119 +103
Lines 46 1679 +1633
Branches 5 347 +342
============================================
+ Hits 41 1651 +1610
- Misses 5 28 +23 ☔ View full report in Codecov by Sentry. |
uiSchema, | ||
value | ||
}) => { | ||
console.log('🚀 ~ file: CustomRadioWidget.jsx:40 ~ id:', id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Print statement, remove?
title = uiSchema['ui:title'] | ||
} | ||
|
||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use the CustomWidgetWrapper.jsx
children | ||
}) => ( | ||
<div | ||
data-testid="custom-field-template" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this data-testid
|
||
/** | ||
* CustomMultiSelectWidget | ||
* @typedef {Object} CustomArrayFieldTemplate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@typedef {Object} CustomArrayFieldTemplate
-> @typedef {Object} CustomMultiSelectWidget
} | ||
|
||
// If the value already has data, this will store it as an object for react-select | ||
const existingValues = value.filter(Boolean).map((currentValue) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of .filter(Boolean)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.filter(Boolean)
removes any empty values from an array, so if value
is [undefined]
that filter will return []
|
||
/** | ||
* CustomSelectWidget | ||
* @typedef {Object} CustomArrayFieldTemplate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@typedef {Object} CustomArrayFieldTemplate
--> @typedef {Object} CustomSelectWidget
const { maxLength, description } = schema | ||
|
||
const fieldType = uiSchema['ui:type'] | ||
const headerClassName = uiSchema['ui:header-classname'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove headerClassName. This was being used in the prototype where in the uiSchema we were passing in custom className for the header. I don't this this is needed any more with the new styling done by Trevor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take a note of this for your work on services, I don't want to mess with this before our demo
|
||
const { maxLength, description } = schema | ||
|
||
const fieldType = uiSchema['ui:type'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cgokey Future note: I think we can pull out the type
(string or number) from the schema and use that, instead of defining it in the uiSchema.
(section, index) => { | ||
const { displayName } = section | ||
|
||
// TODO MMT-#### |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something we had in the prototype?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was waiting on a ticket Trevor was going to write lol, need to get a real ticket number in each place that shows up
@@ -0,0 +1,32 @@ | |||
.navigation-item-error { | |||
&__item { | |||
// width: 330px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can be removed
No description provided.